package com.example.demo.Repository;


import com.example.demo.Entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends JpaRepository<User, Long> {

    // 自定义查询方法，根据用户名和密码查找用户
    User findByUsernameAndPassword(String username, String password);
    User findByUsername(String username);
}